package com.zsc.oj.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zsc.oj.model.dto.team.*;
import com.zsc.oj.model.entity.Team;
import com.zsc.oj.model.entity.User;
import com.zsc.oj.model.enums.FileUploadBizEnum;
import org.springframework.web.multipart.MultipartFile;


import java.util.List;

/**
 *
 */
public interface TeamService extends IService<Team> {

    /**
     * 创建队伍
     *
     * @param team：所要创建的队列
     * @param loginUser：当前的登录用户
     * @return
     */
    public long createTeam(Team team, User loginUser);

    /**
     * 查询队伍
     *
     * @param teamQueryRequest
     * @param isAdmin
     * @return
     */
    public List<TeamUserVO> listTeam(TeamQueryRequest teamQueryRequest, boolean isAdmin);

    /**
     * 更新队伍
     *
     * @param teamUpdateRequest
     * @param loginUser
     * @return
     */
    public boolean updateTeam(TeamUpdateRequest teamUpdateRequest, User loginUser);

    /**
     * 用户加入队伍
     *
     * @param teamJoinRequest
     * @param loginUser
     * @return
     */
    public boolean joinTeam(TeamJoinRequest teamJoinRequest, User loginUser);

    /**
     * 用户退出队伍
     *
     * @param teamQuitRequest
     * @param loginUser
     * @return
     */
    public boolean quitTeam(TeamQuitRequest teamQuitRequest, User loginUser);

    /**
     * 队长解散队伍
     *
     * @param teamQuitRequest
     * @param loginUser
     * @return
     */
    public boolean leaderQuitTeam(TeamQuitRequest teamQuitRequest, User loginUser);

    /**
     * 查询我创建的队伍
     * @param teamQueryRequest
     * @return
     */
    List<TeamUserVO> listMyCreateTeam(TeamQueryRequest teamQueryRequest);

    /**
     * 上传队伍图标
     * @param fileUploadBizEnum
     * @param multipartFile
     * @return
     */
    String uploadUserAvatar(FileUploadBizEnum fileUploadBizEnum, MultipartFile multipartFile);
}
